import request from '@/utils/request.js'

// 登录验证
export function authorizations (data) {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    noToken: true, // 不需要加token
    data
  })
}
// 发送短信验证码
export const smsScodes = mobile => {
  return request({
    url: `/v1_0/sms/codes/${mobile}`
  })
}
// 用户个人资料
export function userProfile () {
  return request({
    url: '/v1_0/user/profile'
  })
}
// 个人属性修改
export function userProfilePatch (data) {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data
  })
}
// 个人资料图片修改
export function userPhotoPatch (data) {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data
  })
}
